package com.aspose.cells;

public class Legend extends ChartFrame {
   byte[] l;
   private int n = 3;
   private LegendEntryCollection o;
   private int p = 0;
   private int q = 0;
   private boolean r = false;
   private boolean s = false;
   boolean m = false;

   Legend(Chart chart) {
      super(chart);
      if (chart.getChartArea() != null) {
         this.h = chart.getChartArea().getAutoScaleFont();
      }

      this.b(2);
   }

   public int getPosition() {
      return this.n;
   }

   public void setPosition(int value) {
      if (value == 7) {
         if (this.n == 4 || this.n == 3 || this.n == 1) {
            this.r = true;
         }

         this.getChart().getPlotArea().j(true);
      } else {
         this.e(true);
         this.f(true);
         this.g(true);
      }

      this.n = value;
   }

   void a(int var1) {
      this.n = var1;
   }

   public LegendEntryCollection getLegendEntries() {
      if (this.o == null) {
         this.o = new LegendEntryCollection(this.getChart());
      }

      return this.o;
   }

   int a() {
      return this.p;
   }

   void n(int var1) {
      this.p = var1;
   }

   int z() {
      return this.q;
   }

   void o(int var1) {
      this.q = var1;
   }

   LegendEntryCollection A() {
      return this.o;
   }

   boolean B() {
      return this.r;
   }

   void j(boolean var1) {
      this.r = var1;
   }

   void C() {
      this.o = null;
   }

   void a(Legend var1, CopyOptions var2) {
      super.a(var1, var2);
      this.n = var1.n;
      if (var2.n != var2.o && !var1.s && var2.n == 1) {
         this.n = 7;
         this.d = false;
         this.e = false;
         this.j = false;
      }

      this.r = var1.r;
      if (var1.o != null && var1.o.getCount() != 0) {
         this.o = new LegendEntryCollection(this.getChart());
         this.o.a(var1.o);
      }

      this.l = var1.l;
      this.b = var1.b;
      this.s = var1.s;
      this.m = var1.m;
      this.p = var1.p;
      this.q = var1.q;
   }

   public boolean isOverLay() {
      return this.s;
   }

   public void setOverLay(boolean value) {
      this.s = value;
      this.m = true;
   }
}
